Optimal. Leaf size=82 \[ \frac{2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac{i d^2 \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac{(c+d x)^2 \tan (a+b x)}{b}-\frac{i (c+d x)^2}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.134178, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {4184, 3719, 2190, 2279, 2391} \[ \frac{2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac{i d^2 \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac{(c+d x)^2 \tan (a+b x)}{b}-\frac{i (c+d x)^2}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4184
Rule 3719
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int (c+d x)^2 \sec ^2(a+b x) \, dx &=\frac{(c+d x)^2 \tan (a+b x)}{b}-\frac{(2 d) \int (c+d x) \tan (a+b x) \, dx}{b}\\ &=-\frac{i (c+d x)^2}{b}+\frac{(c+d x)^2 \tan (a+b x)}{b}+\frac{(4 i d) \int \frac{e^{2 i (a+b x)} (c+d x)}{1+e^{2 i (a+b x)}} \, dx}{b}\\ &=-\frac{i (c+d x)^2}{b}+\frac{2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \tan (a+b x)}{b}-\frac{\left (2 d^2\right ) \int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac{i (c+d x)^2}{b}+\frac{2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \tan (a+b x)}{b}+\frac{\left (i d^2\right ) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{b^3}\\ &=-\frac{i (c+d x)^2}{b}+\frac{2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac{i d^2 \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac{(c+d x)^2 \tan (a+b x)}{b}\\ \end{align*}
Mathematica [A] time = 0.242623, size = 75, normalized size = 0.91 \[ \frac{b (c+d x) \left (b (c+d x) \tan (a+b x)+2 d \log \left (1+e^{2 i (a+b x)}\right )-i b (c+d x)\right )-i d^2 \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.374, size = 170, normalized size = 2.1 \begin{align*}{\frac{2\,i \left ({d}^{2}{x}^{2}+2\,cdx+{c}^{2} \right ) }{b \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }}-4\,{\frac{cd\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}+2\,{\frac{cd\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }{{b}^{2}}}-{\frac{2\,i{d}^{2}{x}^{2}}{b}}-{\frac{4\,i{d}^{2}ax}{{b}^{2}}}-{\frac{2\,i{d}^{2}{a}^{2}}{{b}^{3}}}+2\,{\frac{{d}^{2}\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) x}{{b}^{2}}}-{\frac{i{d}^{2}{\it polylog} \left ( 2,-{{\rm e}^{2\,i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+4\,{\frac{a{d}^{2}\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 2.51338, size = 437, normalized size = 5.33 \begin{align*} \frac{2 \, b^{2} c^{2} +{\left (2 \, b d^{2} x + 2 \, b c d + 2 \,{\left (b d^{2} x + b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) +{\left (2 i \, b d^{2} x + 2 i \, b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \cos \left (2 \, b x + 2 \, a\right ) -{\left (d^{2} \cos \left (2 \, b x + 2 \, a\right ) + i \, d^{2} \sin \left (2 \, b x + 2 \, a\right ) + d^{2}\right )}{\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) +{\left (-i \, b d^{2} x - i \, b c d +{\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) +{\left (b d^{2} x + b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) +{\left (-2 i \, b^{2} d^{2} x^{2} - 4 i \, b^{2} c d x\right )} \sin \left (2 \, b x + 2 \, a\right )}{-i \, b^{3} \cos \left (2 \, b x + 2 \, a\right ) + b^{3} \sin \left (2 \, b x + 2 \, a\right ) - i \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.73393, size = 1187, normalized size = 14.48 \begin{align*} \frac{i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) +{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \sin \left (b x + a\right )}{b^{3} \cos \left (b x + a\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right )^{2} \sec ^{2}{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}^{2} \sec \left (b x + a\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]